import React from 'react'

export default function sidebar(props) {
  let {background, fontSize, textAlign} = props;
  let obj = {
      background: background,
      fontSize: fontSize,
      textAlign: textAlign
  }
  console.log(props)
  let obj1 = {
      color:"yellow",
      left:0,
      position:'fixed'
  }
  let obj2 = {
    color:"blue",
    right:0,
    position:'fixed'
}
  let styleObj = textAlign === 'left'? {...obj1, ...obj} : {...obj2, ...obj}
    return (
    <div>
        <ul style={styleObj}>
            <li>1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
            <li>5</li>
        </ul>
    </div>
  )
}
